package com.zwx.mapstruct;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Description
 * @Author zhuangwei
 * @Date 2020/11/16
 */
public class Test {

    public static void main(String[] args) {

        Student student = new Student("小明", 6, GenderEnum.Male, 121.1, new Date());
        System.out.println(student);
//        这行代码便是实际要用的代码
        StudentVO studentVO = StudentMapper.INSTANCE.student2StudentVO(student);
        System.out.println(studentVO);

        System.out.println("===================");
        ArrayList<Student> list = new ArrayList<>();
        list.add(student);
        List<StudentVO> studentVOS = StudentMapper.INSTANCE.students2StudentVOs(list);
        System.out.println("studentVOS = " + studentVOS);

        System.out.println("======================");
        Course course = new Course("数学", 123456, 123456);
        StudentVO studentAndCourse2StudentVO = StudentMapper.INSTANCE.studentAndCourse2StudentVO(student, course);
        System.out.println("studentAndCourse2StudentVO = " + studentAndCourse2StudentVO);

    }
}
